package com.bgrconsulting.stockorderentry.service.converter;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.bgrconsulting.stockorderentry.service.model.Account;
import com.bgrconsulting.stockorderentry.service.model.AccountBalance;
import com.bgrconsulting.stockorderentry.service.model.DTBalance;
import com.bgrconsulting.stockorderentry.service.model.MarginAccountBalance;



@XmlRootElement(name = "account")
public class AccountConverter {
	private Account enity = null;
	
	public AccountConverter() {
		enity = new Account();
	}
	
	public AccountConverter(Account account) {
		enity = account;
	}
	
	 @XmlElement(name = "accountId")
	public String getAccountId() {
		return enity.getAccountId();
	}
	
	@XmlElement(name = "marginLevel")
	public String getMarginLevel() {
		return enity.getMarginLevel();
	}
	
	@XmlElement(name = "optionLevel")
	public String getOptionLevel() {
		return enity.getOptionLevel();
	}
	
	@XmlElement(name = "netAccountValue")
	public Double  getNetAccountValue() {
		return enity.getNetAccountValue();
	}
	
	@XmlElement(name = "registrationType")
	public String getRegistrationType() {
	    return enity.getRegistrationType();
	}
	
	
	
	@XmlElement(name = "accountBalance")
	public AccountBalanceConverter getAccountBalance() {
		AccountBalanceConverter abc = new AccountBalanceConverter(enity.getAccountBalance());
	    return abc;
	}
	
	@XmlElement(name = "DTBalance")
	public DTBalanceConverter getDTBalance() {
		DTBalanceConverter dtbc = new DTBalanceConverter(enity.getDTBalance());
	    return dtbc;
	}
	
	@XmlElement(name = "marginAccountBalance")
	public MarginAccountBalanceConverter getMarginAccountBalance() {
		MarginAccountBalanceConverter mabc = new MarginAccountBalanceConverter(enity.getMarginAccountBalance());
	    return mabc;
	}
	
}
